Skip to content

DEVEX-1630: shared PHP build orchestrators (foundation)#129

Draft
pdodgen-revparts wants to merge 11 commits into
mainfrom
DEVEX-1630-unify-php-build-workflows
Draft

DEVEX-1630: shared PHP build orchestrators (foundation)#129
pdodgen-revparts wants to merge 11 commits into
mainfrom
DEVEX-1630-unify-php-build-workflows

Conversation

@pdodgen-revparts

Copy link
Copy Markdown
Contributor

Phase 1A of DEVEX-1630 — the shared-workflow foundation only. No service repos are touched in this PR; these reusable workflows have no effect until a caller references them (pilots follow in separate PRs).

What this adds

  • build-php-v1.yaml (new) — v1/legacy PHP build orchestrator. Spine calculate-tag → build → tag-and-release, exposes a tag output. The build job matrixes over an images JSON array and calls php-build-push.yaml once per image (app / nginx / profiler / apache), reproducing each repo's exact current tags.
  • build-php-laravel.yaml (new) — Laravel PHP build orchestrator. Same spine; build makes one call to the existing php-laravel-build-push.yaml (app + webserver, artisan-cached).
  • php-build-push.yaml (modified) — added image_name, extra_tag, cache_type inputs and modernized buildx@v3 / login@v3 / build-push@v6. Buildx cache is now keyed per resolved image name (registry ref / gha scope) so matrix legs don't collide. No existing org consumers, so this is backward-safe.

Both orchestrators call their sibling helper via the local ./.github/workflows/... path, so the nested call resolves at the orchestrator's own ref (self-consistent at @main or on a branch).

Validation

  • actionlint clean on all three files.
  • Each change passed spec-compliance + code-quality review.
  • No live builds/deploys triggered by this PR.

Not in this PR

Per-repo Build.yaml migrations (license_api + returns-api pilots, then fan-out incl. webstore last) land as separate PRs after this merges. Phase 0 integration-deploy gate is tracked under DEVEX-1629.

Design + plan: docs/superpowers/specs/2026-06-08-unify-php-build-workflows-design.md, docs/superpowers/plans/2026-06-08-unify-php-build-workflows.md.

🤖 Generated with Claude Code

@cursor

cursor Bot commented Jun 9, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CI-only shared workflows with additive optional inputs and registry cache default unchanged for existing callers; no runtime or deploy behavior until separate repo migrations.

Overview
Phase 1A (DEVEX-1630) adds shared reusable PHP build orchestrators in encodium/.github so service repos can replace duplicated Build.yaml spines later. No service repos are changed in this PR; workflows only take effect once a caller references them.

New orchestratorsbuild-php-v1.yaml runs calculate-tag → matrix build via php-build-push.yamltag-and-release and exposes a tag output; callers pass a JSON images array for app/nginx/profiler/apache tagging. build-php-laravel.yaml uses the same spine but delegates build to php-laravel-build-push.yaml (app + webserver, optional CLI).

php-build-push.yaml gains optional image_name, extra_tag, and cache_type; a meta step resolves GHCR names (including bare profiler names like rp_api-profiler), companion tags, and per-image/per-dockerfile GHA or registry cache scopes so matrix legs do not share one cache. Docker actions are bumped (buildx/login v3, build-push v6).

php-laravel-build-push.yaml adds configurable webserver_tag_prefix (default webserver-) instead of hardcoded webserver- tags.

Design and rollout docs are added under docs/superpowers/.

Reviewed by Cursor Bugbot for commit 42a605b. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread .github/workflows/php-build-push.yaml

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6c6ac70. Configure here.

Comment thread .github/workflows/php-build-push.yaml Outdated
@pdodgen-revparts

Copy link
Copy Markdown
Contributor Author

Thanks Bugbot — both valid, fixed in 42a605b (php-build-push.yaml resolve step):

  1. Profiler image missing org prefix (High): a bare image_name (e.g. rp_api-profiler) is now scoped under the repo owner → ghcr.io/encodium/rp_api-profiler. A value that already contains owner/ and the empty default (github.repository) are unchanged. Tags are built from the corrected ref.
  2. Matrix legs share build cache (Medium): the cache key/scope now incorporates the dockerfile + build target, so same-image legs (app/nginx/apache under <owner>/<repo>) get distinct caches (:buildcache-build-nginx-Dockerfile, gha scope=<owner>-<repo>-build-nginx-Dockerfile, etc.) instead of colliding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant